﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SocialFront.Providers.Comment;

namespace SocialFront.Web.usercontrols.Shared
{
    public partial class OutputComments : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            IList<Entities.Comment> comments = CommentProvider.Provider.GetEntityComments();
            lvHolder.DataSource = comments;
            lvHolder.DataBind();
        }

        protected void lvHolder_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
        {
            ItemDataPager.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);
            lvHolder.DataBind();
        }
    }
}